Problem Note 50450: Decimals are truncated to seven digits when you export data to Excel XLSX files using the XLSX driver
Decimals are truncated to seven digits when you export data to XLSX files using the XLSX driver. Here is an example:
data a;
a=1.123456789;
run;
proc export data=a
dbms=xlsx
outfile='c:\sastest\mydigits.xlsx' replace;
sheet='fred';
run;
When you open the workbook, you see that the value is rounded to 7 digits, as shown below:
1.1234568
Workarounds
To resolve the problem, do one of the following:
- Use DBMS=EXCELCS or DBMS=EXCEL, depending on which operating system and version of Microsoft Office are installed.
- Use DBMS=EXCEL if you are using SAS and Excel on Windows and the bits match. That is, 32-bit SAS and 32-bit Office, or 64-bit SAS and 64-bit Office.
- Use DBMS=EXCELCS if the bit architecture of SAS and Windows do not match or if you are not running on a Windows platform.
- Or install SAS® 9.4. The number of digits has been expanded to 15 in SAS 9.4.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M2 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M2 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M2 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M2 | |
Microsoft Windows Server 2008 | 9.3 TS1M2 | |
Microsoft Windows Server 2008 R2 for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.3 TS1M2 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M2 | |
Windows 7 Enterprise x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Home Premium 32 bit | 9.3 TS1M2 | |
Windows 7 Home Premium x64 | 9.3 TS1M2 | |
Windows 7 Professional 32 bit | 9.3 TS1M2 | |
Windows 7 Professional x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Ultimate 32 bit | 9.3 TS1M2 | |
Windows 7 Ultimate x64 | 9.3 TS1M2 | |
Windows Vista | 9.3 TS1M2 | |
Windows Vista for x64 | 9.3 TS1M2 | |
64-bit Enabled AIX | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.3 TS1M2 | 9.4 TS1M0 |
HP-UX IPF | 9.3 TS1M2 | 9.4 TS1M0 |
Linux | 9.3 TS1M2 | 9.4 TS1M0 |
Linux for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Solaris for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Decimals are truncated to seven digits when exporting data to Excel with the XLSX driver. The number of digits is expanded in SAS® 9.4.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2013-08-07 12:02:52 |
Date Created: | 2013-07-19 12:06:06 |